From: Jasper St. Pierre Date: Mon, 4 Nov 2013 22:25:18 +0000 (-0500) Subject: workspace: Grab the key focus when hovering over a window X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3010 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aeb9f5775f66858de508ac4429cfb48553672c89;p=gnome-shell.git workspace: Grab the key focus when hovering over a window This is simply an experiment. I'm not sure I like the result, but it was worth trying out regardless. https://bugzilla.gnome.org/show_bug.cgi?id=644306 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index d1abc225e..34090de3e 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -89,6 +89,7 @@ const WindowClone = new Lang.Class({ this.actor.add_action(clickAction); this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress)); + this.actor.connect('enter-event', Lang.bind(this, this._onEnter)); this._draggable = DND.makeDraggable(this.actor, { restoreOnSuccess: true, @@ -213,6 +214,10 @@ const WindowClone = new Lang.Class({ return false; }, + _onEnter: function() { + this.actor.grab_key_focus(); + }, + _onClicked: function(action, actor) { this._activate(); },